import Vue from 'vue'
import Vuex from 'vuex'

import ec from './modules/ec'

// 一些固定求情api
import { api, uri } from '@/api'

// 请求函数index.js
import { request, post, get, put, del, abortRequest } from '@/xhr/service.js'

const vm = Vue

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    ec: ec({
      vm,
      api,
      uri,
      request,
      post,
      get,
      put,
      del,
      abortRequest
    })
  }
})
